home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / e / amigae21b.lha / Amiga_E_v2.1b / Sources / Examples / WbArg.e < prev   
Text File  |  1992-09-02  |  443b  |  16 lines

  1. /* reading the arguments when started from wb.
  2.    give this program a .info file, and shift-select some icons with it. */
  3.  
  4. MODULE 'workbench/startup'
  5.  
  6. PROC main()
  7.   DEF wb:PTR TO wbstartup, args:PTR TO wbarg, a
  8.   IF wbmessage=NIL                /* we got from cli */
  9.     WriteF('args = "\s"\n',arg)
  10.   ELSE                        /* from wb */
  11.     wb:=wbmessage
  12.     args:=wb.arglist
  13.     FOR a:=1 TO wb.numargs DO WriteF('wbarg #\d = "\s"\n',a,args[].name++)
  14.   ENDIF
  15. ENDPROC
  16.